package com.grgbanking.it.system.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.grgbanking.it.system.service.IOaService;

/**
 * OA的数据源中获取的信息
 * 包括:部门、用户、资产
 * @author pgwei
 *
 */
@Controller
@RequestMapping("/oa")
public class OaController {
	
	@Autowired
	private IOaService oaService;
	
	/**
	 * 加载资产信息
	 * 
	 * @param name
	 * @return
	 */
	@ResponseBody  
	@RequestMapping("grgemEquipments")
	public Object loadGrgemEquipments(String name){  
		String json = null;
		try {
			json = oaService.findGrgemEquipmentsByUser(name);
		} catch (Exception e) {
			e.printStackTrace();
		} 
		
		System.out.println(json);
		return json;  
	}   
}
